﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Citi.OTFPC.Pep.Domain
{
    public class Pep
    {
        public string Id { get; set; }
        public string ProjectName { get; set; }
        public string Entity { get; set; }
        public string Branch { get; set; }
        public decimal USDRate { get; set; }
        public decimal ExpenseAmount { get; set; }
        public decimal InvestimentAmount { get; set; }
        public Int64 ExpenseCode1 { get; set; }
        public Int64 ExpenseCode2 { get; set; }
        public Int64 ExpenseCode3 { get; set; }
        public Int64 ExpenseCode4 { get; set; }
        public Int64 GOC { get; set; }
        public string StatusP2P { get; set; }
        public DateTime? Start { get; set; }
        public DateTime? End { get; set; }
        public string ManagerSoeid { get; set; }

        public Pep()
        {
        }

        public Pep(Pep pep)
        {
            //if (!string.IsNullOrEmpty(pep.Id))
            //{
            //    var lastChar = pep.Id.Last();
            //    var converted = 0;

            //    if (int.TryParse(lastChar.ToString(), out converted))
            //        Id = string.Concat(pep.Id, "a");
            //    else
            //    {
            //        pep.Id = pep.Id.Replace(lastChar.ToString(), string.Empty);
            //        Id = string.Concat(pep.Id, Convert.ToChar((int)lastChar + 1));
            //    }
            //}
            Id = pep.Id;
            Branch = pep.Branch;
            End = pep.End;
            Entity = pep.Entity;
            ExpenseAmount = pep.ExpenseAmount;
            GOC = pep.GOC;
            InvestimentAmount = pep.InvestimentAmount;
            ProjectName = pep.ProjectName;
            Start = pep.Start;
            StatusP2P = pep.StatusP2P;
            USDRate = pep.USDRate;
            ManagerSoeid = pep.ManagerSoeid;
        }
    }
}
